package lgs.hm.homeWork;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class Inspecter {
	
	
	
	@Around("execution(* lgs.hm.homeWork.XiaoMing.visitMuseum())")
	public void check(ProceedingJoinPoint pjp) {
		System.out.println("检票员：--你有票进去吧--");
		try {
			pjp.proceed();
		} catch (Throwable e) {
			e.printStackTrace();
			System.out.println("恐龙出来了，大家快跑");
		}
		
	}

}
